<?
layout("/inc/layout.html",{title: sysTitle + '-首页'}){
?>
<script type="text/javascript">
</script>
<div id="page-wrapper">

    <!--BEGIN TITLE & BREADCRUMB PAGE-->
    <div id="title-breadcrumb-option-demo" class="page-title-breadcrumb">
        <ol class="breadcrumb page-breadcrumb pull-left">
            <li><i class="fa fa-home"></i>&nbsp;<a href="main.html">首页</a>&nbsp;&nbsp;<i class="fa fa-angle-right"></i>&nbsp;&nbsp;</li>
            <li class="active">我的工作台</li>
        </ol>
         
        <div class="clearfix"></div>
    </div>
    <!--END TITLE & BREADCRUMB PAGE-->
    <!--BEGIN CONTENT-->
    <div class="page-content">
        <div id="tab-general"> 
        	<!-- 统计区域 -->  
        	<div class="note note-info">
               	 <h3>知识库统计</h3>
                 <p>统计知识结构管理中所有定义的知识库当前记录总数。</p>
            </div>
            <div id="sum_zs" class="sum_box row mbl"></div>
    	</div>
    </div>
    <!--END CONTENT-->
    </div>
  
<?} ?>
<script type="text/javascript">
var curr;
$(function(){
	initText();
});

	function initText(){
		$.ajax({
			type : "post",
			url : "knowledge-edit-data-class-ajax-right.html",
			dataType : "json",
			data:{
				"type": "0",
				"daValue": "0",
			},
			beforeSend : function(XMLHttpRequest) {},
			success:function(data){
			  /*  alert(JSON.stringify(data));  */ 
			    var str = ""; 
			    var zs = "";    
     	    	$("#sum_zs").html("");
     	    	for(var i=0;i<data.length;i++){
     	    		var nameEn= data[i].nameEn;
     	    		var nameZh= data[i].nameZh;
     	    		var number= data[i].number;
     	    		var classesId= data[i].classesId;
     	    		var count = number;
     	    		var colour="progress-bar-success";
     	    		/* if(count<10){
     	    			colour ="progress-bar-success";
     	    		}else if(count>=10 && count<20){
     	    			colour ="progress-bar-info";
     	    		}else if(count>=20 && count<30){
     	    			colour ="progress-bar-warning";
     	    		}else if(count>=30){
     	    			colour ="progress-bar-danger";
     	    		} */
     	    		if(data[i].kind=='1'){
					 str+="<div class=\"col-sm-6 col-md-4\">"
		                +"<a href='show-findall-dict.html'>"
		                 +"<div class=\"panel yellow db mbm\">"
		                   +"<div class=\"panel-body\">"     
		                       +" <p class=\"icon\"><i class=\"icon fa fa-signal\"></i>"    
		                          +"</p>"  
		                          +"<h4 class=\"value\"><span>"+number+"</span></h4>"  
		                           +"<p class=\"description\">"+nameZh+"</p>" 
		                             +"<div class=\"progress progress-sm mbn\">"
		                               +"<div role=\"progressbar\" aria-valuenow="+count+" aria-valuemin=\"0\" aria-valuemax=\"100\" style=\"width:"+count+"%;\" class='progress-bar "+colour+"'><span class=\"sr-only\">"+count+"% Complete (success)</span>"   
		                              +"</div>" 
		                            +"</div>" 
		                        +"</div>"
		                    +"</div>"
	               +"</a></div>" ;
	               }else if(data[i].kind=='0'){
	               	zs+="<div class=\"col-sm-6 col-md-4\">"
		                 +"<a href='show-edit-data-list.html?classesEn="+nameEn+"&classesId="+classesId+"'>"
		                 +"<div class=\"panel yellow db mbm\">"
		                   +"<div class=\"panel-body\">"     
		                       +" <p class=\"icon\"><i class=\"icon fa fa-signal\"></i>"    
		                          +"</p>"  
		                          +"<h4 class=\"value\"><span>"+number+"</span></h4>"  
		                           +"<p class=\"description\">"+nameZh+"</p>" 
		                             +"<div class=\"progress progress-sm mbn\">"
		                               +"<div role=\"progressbar\" aria-valuenow="+count+" aria-valuemin=\"0\" aria-valuemax=\"100\" style=\"width:"+count+"%;\" class='progress-bar "+colour+"'><span class=\"sr-only\">"+count+"% Complete (success)</span>"   
		                              +"</div>" 
		                            +"</div>" 
		                        +"</div>"
		                    +"</div>"
	               +"</a></div>" ;
	               }
     	    	}
     	    	$("#sum_zs").html(zs); 
			}
		});
	}
	
	
</script>